<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script>

	var empty_object = {};
	var stooge = {
			"first-name":"Jerome",
			"last-name":"Howard"
	}
	
	var flight={
		airline : "Oceanic",
		number : 815,
		departure:{
			IATA:"SYD",
			time:"2004-09-22 12:20",
			city:"Los Angeles"
		}

	};

	//var status = flight.status || "unknown";
	//var typeErr = flight.equipment   //->undefined
	//var typeErr = flight.equipment.model;    //->throw "TypeError"  존재하지 않는 속성의 속성을 참조하면 타입에러 , 
	//var typeErr = flight.equipment && flight.equipment.model;   //->undefined

	flight.equipment = {      //존재하지않는  속성에 값을 추가 하면 속성이 자동 추가 된다. 
		model:'Boeing 777'
	};
	flight.status = "overdue";

	var status = flight.status || "unknown";
	//var equi = flight.equipment   
	var equiModel = flight.equipment.model;    

	alert(equiModel);
  </script>
</head>

<body>

</body>
</html>